package work.igames.vertxcreate.listen;

import io.vertx.core.Vertx;
import io.vertx.core.impl.launcher.VertxCommandLauncher;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.context.event.EventListener;
import org.springframework.core.env.Environment;
import org.springframework.stereotype.Component;
import work.igames.vertxcreate.controller.UserSkillVerticle;

import javax.annotation.PostConstruct;

/**
 * @ClassName ApplicationLunch
 * @Description
 * @Author Jingxiao.Ye
 * @Date 2020/10/30 下午6:47
 * @Version V1.0
 * @Since JDK 11
 */
@Component
public class ApplicationLunch  {

    @Autowired
    private UserSkillVerticle userSkillVerticle;

    public static Vertx vertx;

    @PostConstruct
    public void deployment() throws Exception {
        vertx = Vertx.vertx();
        vertx.deployVerticle(userSkillVerticle);
    }
}
